// index.js

Page({
  data: {
    banners: [
      {
        imgSrc: '/images/banner0.png',
        id: '001'
      },
      {
        imgSrc: '/images/banner1.png',
        id: '002'
      },
      {
        imgSrc: '/images/banner2.png',
        id: '003'
      }
    ]
  },

 // 处理搜索逻辑
  handleSearch: function(event) {
    
    console.log('搜索:', event.detail);
  },

  // 轮播图跳转
  goToDetail(e) {
    const id = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: `/pages/bannerDetail/bannerDetail?id=${id}`
    });
  }
})
